var chartDom = document.getElementById('zhongbiaoxiangmu');
var myChart = echarts.init(chartDom, 'dark');
var option;

var option;
option = {
      title: {
        text: '2019年后，全国垃圾焚烧新增项目数开始下降',
        left:'12%',
        top: '3%',
        textStyle: {
            fontSize:20,
            color:"#FFFFFF",
            fontFamily: "Microsoft YaHei",
               },
    },
    backgroundColor: 'rgba(0,21,46)',
    graphic: [
         {
           type:"image",
           left:"2%",
           bottom:"40%",
           style: {
               image:"https://i.loli.net/2021/06/20/zBdrkDU146RfyiE.png",
           width:"140",
               height:"60",
            }
         },
        {
           type:"image",
           left:"85%",
           bottom:"40%",
           style: {
               image:"https://i.loli.net/2021/06/20/MYbwUIcHCGQ7ngi.png",
        width:"140",
               height:"60",
            }
         },
        {
           type:"image",
           left:"85%",
           bottom:"30%",
           style: {
               image:"https://i.loli.net/2021/06/20/4GsUptDJYlyn67i.png",
               width:"140",
               height:"60",
            }
         },
         {
           type:"image",
           left:"2%",
           bottom:"30%",
           style: {
               image:"https://i.loli.net/2021/06/20/y2Ui56FthrAsQev.png",
               width:"140",
               height:"60",
            }
         },
         {
           type:"image",
           left:"5%",
           bottom:"91.5%",
           style: {
               image:"https://i.loli.net/2021/06/21/CvlGW8PErboK2YQ.png",
               width:"68",
               height:"45",
            }
         },
         ],
    tooltip:{
        type:"shadow",
    },
    series: {
        type: 'sankey',
        layout: 'none',
        bottom: "5%",
        right: "20%",
        top: "18%",
        left: "20%",
        emphasis: {
            focus: 'adjacency'
        },
        levels: [{
           depth: 0,
           itemStyle: {
             color: 'rgba(242,146,104)'
            },
        label: {
        fontStyle: "italic",
        fontSize: 13
      },
       lineStyle: {
        curveness: 0.7,
        opacity:0.3,
      }
        },
        {
           depth: 1,
           itemStyle: {
              color: new echarts.graphic.LinearGradient( 0, 0, 0, 1,[
                { offset: 0, color: 'rgba(136,226,226)' },
                { offset: 1, color: 'rgba(79,140,150)' }
                                           ])
           },
                   label: {
        fontStyle: "italic",
        fontSize: 12
      }
}],
        data: [ {
            name: '2018年',
             itemStyle: { color:  new echarts.graphic.LinearGradient( 0, 0, 0, 1,[
                { offset: 0, color: 'rgba(136,226,226)' },
                { offset: 1, color: 'rgba(79,140,150)' }
                                           ]) }
        }, {
            name: '2019年',
             itemStyle: { color:  new echarts.graphic.LinearGradient( 0, 0, 0, 1,[
                { offset: 0, color: 'rgba(242,146,104)' },
                { offset: 1, color: 'rgba(166,107,86)' }
                                           ])}
        }, {
            name: '2020年',
             itemStyle: { color:  new echarts.graphic.LinearGradient( 0, 0, 0, 1,[
                { offset: 0, color: 'rgba(136,226,226)' },
                { offset: 1, color: 'rgba(79,140,150)' }
                                           ]) }
        }, {
            name: '2021年',
             itemStyle: { color:  new echarts.graphic.LinearGradient( 0, 0, 0, 1,[
                { offset: 0, color: 'rgba(136,226,226)' },
                { offset: 1, color: 'rgba(79,140,150)' }
                                           ]) }
        }, {
            name: '安徽',
        }, {
            name: '江西',
        }, {
            name: '山东',
            itemStyle: { color: new echarts.graphic.LinearGradient( 0, 0, 0, 1,[
                { offset: 0, color: 'rgba(242,146,104)' },
                { offset: 1, color: 'rgba(166,107,86)' }
                                           ]) }
        }, {
            name: '广西'
        }, {
            name: '河南',
             itemStyle: { color: new echarts.graphic.LinearGradient( 0, 0, 0, 1,[
                { offset: 0, color: 'rgba(242,146,104)' },
                { offset: 1, color: 'rgba(166,107,86)' }
                                           ]) }
        }, {
            name: '贵州'
        }, {
            name: '云南'
        }, {
            name: '湖北'
        }, {
            name: '福建',
            itemStyle: { color: new echarts.graphic.LinearGradient( 0, 0, 0, 1,[
                { offset: 0, color: 'rgba(242,146,104)' },
                { offset: 1, color: 'rgba(166,107,86)' }
                                           ]) }
        }, {
            name: '陕西'
        }, {
            name: '广东'
        }, {
            name: '河北',
            itemStyle: { color:new echarts.graphic.LinearGradient( 0, 0, 0, 1,[
                { offset: 0, color: 'rgba(242,146,104)' },
                { offset: 1, color: 'rgba(166,107,86)' }
                                           ]) }
        }, {
            name: '湖南'
        }, {
            name: '吉林'
        }, {
            name: '江苏'
        }, {
            name: '辽宁'
        }, {
            name: '新疆'
        }, {
            name: '黑龙江'
        }],
        links: [{
            source: '2018年',
            target: '安徽',
            value: 1
        },{
            source: '2018年',
            target: '江西',
            value: 1
        },{
            source: '2018年',
            target: '山东',
            value: 3
        },{
            source: '2019年',
            target: '山东',
            value: 3
        },{
            source: '2020年',
            target: '山东',
            value: 1
        },{
            source: '2018年',
            target: '广西',
            value: 2
        },{
            source: '2019年',
            target: '广西',
            value: 1
        },{
            source: '2021年',
            target: '广西',
            value: 1
        },{
            source: '2018年',
            target: '河南',
            value: 1
        },{
            source: '2019年',
            target: '河南',
            value: 9
        },{
            source: '2018年',
            target: '贵州',
            value: 1
        },{
            source: '2019年',
            target: '贵州',
            value: 1
        },{
            source: '2018年',
            target: '云南',
            value: 2
        },{
            source: '2019年',
            target: '云南',
            value: 2
        },{
            source: '2018年',
            target: '湖北',
            value: 1
        },{
            source: '2021年',
            target: '湖北',
            value: 2
        },{
            source: '2018年',
            target: '福建',
            value: 1
        },{
            source: '2019年',
            target: '福建',
            value: 2
        },{
            source: '2020年',
            target: '福建',
            value: 3
        },{
            source: '2018年',
            target: '陕西',
            value: 1
        },{
            source: '2018年',
            target: '广东',
            value: 1
        },{
            source: '2019年',
            target: '广东',
            value: 1
        },{
            source: '2019年',
            target: '河北',
            value: 6
        },{
            source: '2020年',
            target: '河北',
            value: 3
        },{
            source: '2021年',
            target: '河北',
            value: 2
        },{
            source: '2019年',
            target: '湖南',
            value: 1
        },{
            source: '2020年',
            target: '湖南',
            value: 1
        },{
            source: '2021年',
            target: '吉林',
            value: 2
        },{
            source: '2019年',
            target: '吉林',
            value: 1
        },{
            source: '2020年',
            target: '吉林',
            value: 1
        },{
            source: '2019年',
            target: '江苏',
            value: 1
        },{
            source: '2020年',
            target: '江苏',
            value: 1
        },{
            source: '2019年',
            target: '辽宁',
            value: 1
        },{
            source: '2020年',
            target: '新疆',
            value: 1
        },{
            source: '2021年',
            target: '黑龙江',
            value: 1
        }]
    },
    media: [
            {
                option: {
                    title:{                         
                    },
                }
            },
            {
                query: {
                    maxWidth: 500
                },
                option: {
                    title:{
                        left:"21%",
                        top:"0%",
                        text: '2019年后，全国垃圾焚烧\n新增项目数开始下降',
                    },
                    graphic: [
     {
           type:"image",
           left:"5%",
           bottom:"91.5%",
           style: {
               image:"https://i.loli.net/2021/06/21/CvlGW8PErboK2YQ.png",
               width:"68",
               height:"45",
            }
         },
         ],
                }
            }
        ]
};

option && myChart.setOption(option);
